<%@ page language="java" pageEncoding="UTF-8"%>
<script type="text/javascript">
function openSelectOC(){
		$('#socTree').tree({
			animate: true,
			url: '<%=request.getContextPath()%>/organization/getAllOrganizationClassJson.action',
			onBeforeExpand:function(node){
				$('#socTree').tree("options").url="<%=request.getContextPath()%>/organization/getAllOrganizationClassJson.action?oc.id=" + node.id;
			},
			onClick:function(node){
				$('#socTree').tree('expand',node.target);
			},
			onContextMenu: function(e, node){
				e.preventDefault();
				$('#spcTree').tree('select', node.target);
				$('#fm').menu('show', {
					left: e.pageX,
					top: e.pageY
				});
			}
		});
  		var title = "往来单位分类选择";
  		$('#ocDlg').dialog('open').dialog('setTitle',title);  
}
function selectOc(){
	var node = $('#socTree').tree('getSelected');
	$("#o\\.orgClassName").val(node.text);
	$("#o\\.oc\\.id").val(node.id);
	$('#ocDlg').dialog('close');
}
</script>
<!-- 新增修改弹出框 -->
<div id="ocDlg" class="easyui-dialog" style="width:400px;height:380px" closed="true" buttons="#oc-dlg-buttons"> 
    <div class="easyui-layout" fit="true" style="background:#ccc;">
		<div region="center" style="overflow:hidden;">
			<ul id="socTree"></ul>
		</div> 
	</div>
	<div id="oc-dlg-buttons">  
	    <a href="#" class="easyui-linkbutton" iconCls="icon-ok" onclick="selectOc()">选择</a>  
	    <a href="#" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#ocDlg').dialog('close')">关闭</a>  
	</div> 
</div>
